﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MayfairFramework.Common.Resource
{
    /// <summary>
    /// 
    /// </summary>
    public class MessageIncludingException : Exception
    {
        /// <summary>
        /// 
        /// </summary>
        Messages messages;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="messages"></param>
        public MessageIncludingException(Messages messages)
            : base()
        {
            this.messages = messages;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="message"></param>
        /// <param name="messages"></param>
        public MessageIncludingException(string message, Messages messages)
            : base(message)
        {
            this.messages = messages;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="message"></param>
        /// <param name="innerException"></param>
        /// <param name="messages"></param>
        public MessageIncludingException(string message, Exception innerException, Messages messages)
            : base(message, innerException)
        {
            this.messages = messages;
        }

        /// <summary>
        /// 
        /// </summary>
        public Messages Messages
        {
            get { return messages; }
        }

        /// <summary>
        /// 
        /// </summary>
        public override string Message
        {
            get { return this.messages.ToString(); }
        }
    }
}
